﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Relay.Core.Protocol {
    /// <summary>
    /// Provides information about a single IRC channel.
    /// </summary>
    public class IrcChannel {
        #region Fields
        private string _channelName = String.Empty;
        private string _modeString = String.Empty;
        private int _userLimit = 0;
        private readonly List<String> _names = new List<string>();
        #endregion

        #region Properties
        /// <summary>
        /// Gets the name of the channel.
        /// </summary>
        public string ChannelName {
            get { return _channelName; }
            protected set { _channelName = value; }
        }

        /// <summary>
        /// Gets a string representing the channel's modes.
        /// </summary>
        public string ModeString {
            get { return _modeString; }
            protected set { _modeString = value; }
        }

        /// <summary>
        /// Gets the user limit for the channel from the mode string.
        /// </summary>
        public int UserLimit {
            get { return _userLimit; }
            protected set { _userLimit = value; }
        }

        /// <summary>
        /// Gets the list of nick names (including user modes) currently in the channel.
        /// </summary>
        public List<String> Names {
            get { return _names; }
        }
        #endregion
    }
}
